<template>
	<view class="content">
		<view class="block photo-block">
			<view class="name">中华老字号夜光杯</view>
			<image mode="widthFix" src="http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8=" class="photo"></image>
			<view class="price-block">
				<view class="discount-prices">￥{{detail.discountPrices}}</view>
				<view v-if="detail.originalPrice" class="original-price">￥{{detail.originalPrice}}</view>
				<view class="sold">已售{{detail.sold}}</view>
			</view>
		</view>
		<view class="block detail-block">
			<view class="title">商品详情</view>
			<view class="detail-content">暂无详情</view>
		</view>
		<view class="block detail-block">
			<view class="title">购买须知</view>
			<view class="detail-content">暂无数据</view>
		</view>
		<view class="block booking">
			<view class="btn1 btn">立即购买</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				detail:{
					discountPrices: 323,
					sold:12,
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		display: flex;
		flex-direction: column;
		background: #F4F4F4;
		min-height: 100vh;
		padding: 30rpx;
		padding-bottom: 140rpx;
		.block{
			background: #fff;
			border-radius: 20rpx;
			padding: 30rpx;
		}
		.block.photo-block{
			display: flex;
			flex-direction: column;
			.name{
				font-weight: bold;
				font-size: 36rpx;
				margin-bottom: 20rpx;
			}
			.photo{
				width: 100%;
				border-radius: 10rpx;
			}
			.price-block{
				display: flex;
				flex-direction: row;
				align-items: center;
				margin-top: 20rpx;
				.discount-prices{
					font-weight: bold;
					color: $color-danger;
					flex-grow: 0;
					margin-right: 16rpx;
					font-size: 38rpx;
				}
				.original-price{
					text-decoration: line-through;
					font-size: 24rpx;
					color: $color-secondary-text;
					flex-grow: 1;
				}
				.sold{
					flex-grow: 0;
					font-size: 24rpx;
					color: $color-secondary-text;
				}
			}
		}
		.block.detail-block{
			display: flex;
			flex-direction: column;
			margin-top: 20rpx;
			.title{
				font-weight: bold;
				font-size: 34rpx;
			}
			.detail-content{
				font-size: 28rpx;
				padding: 20rpx 0;
			}
		}
		.block.booking{
			width: 100%;
			position: fixed;
			bottom: 0;
			left: 0;
			height: 120rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			.btn{
				margin: 0;
				width: 400rpx;
				height: 80rpx;
				font-size: 28rpx;
			}
		}
	}
</style>